#include "pch.h"

#include "BasicLoader.h"
#include "Texture.h"

using namespace D2D1;

static BasicLoader^ basicLoader = nullptr;

Texture::Texture(_In_ ID3D11Device* Device, const wchar_t Filename[])
{
	if (basicLoader == nullptr)
	{
		basicLoader = ref new BasicLoader(Device);
	}

	basicLoader->LoadTexture(
		ref new Platform::String(Filename),
		&this->texture,
		&this->textureResourceView);
}

